package com.example.study.plus.mybatis_plus.service;

import com.example.study.plus.mybatis_plus.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author 路飞4
 * @since 2023-04-15
 */
public interface UserService extends IService<User> {
    /**
     * @param username 昵称
     * @return 内部用
     */
    User getUserByUsername(String username);
    /**
     * @param username 昵称
     * @return 外部用
     */
    User getUserByUsername2(String username);

    User getUserByUserId(Long userId);
    User getUserByUserId2(Long userId);

   int register(String name,  String password,String email);

    List<String> getUserList();

    int changePassword(String username,String newPassWord);

    /**
     * @param username 昵称
     * @return 模糊搜索
     */
    List<User> fuzzySearchForUsers(long userId,String username);
}
